package com.googlecode.i78ba.util;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;
import org.springframework.stereotype.Component;

@Component
public class SpringUtil implements ApplicationContextAware {

	private static ApplicationContext context;

	@Override
	public void setApplicationContext(ApplicationContext context) {
		SpringUtil.context = context;
	}

	public static Object getBean(String beanName) {
		return context.getBean(beanName);
	}
}
